package com.toKnow.model.vo;

import com.toKnow.model.entity.Article;

import java.util.Date;

public class ArticleAbstractVo {
    private Integer article_id;
    private String title;
    private Integer author_id;
    private Integer like_times;
    private Integer read_times;
    private Integer comment_times;
    private Integer collect_times;
    private String author_name;
    private String avatar;
    private Date upload_date;
    private String digest;
    private String cover;
//    private List<String> type=new ArrayList<>();
//    private List<String> tag=new ArrayList<>();


    @Override
    public String toString() {
        return "ArticleAbstractVo{" +
                "article_id=" + article_id +
                ", title='" + title + '\'' +
                ", author_id=" + author_id +
                ", author_name='" + author_name + '\'' +
                ", upload_date=" + upload_date +
                ", digest='" + digest + '\'' +
                ", cover='" + cover + '\'' +
                '}';
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public Integer getLike_times() {
        return like_times;
    }

    public void setLike_times(Integer like_times) {
        this.like_times = like_times;
    }

    public Integer getRead_times() {
        return read_times;
    }

    public void setRead_times(Integer read_times) {
        this.read_times = read_times;
    }

    public Integer getComment_times() {
        return comment_times;
    }

    public void setComment_times(Integer comment_times) {
        this.comment_times = comment_times;
    }

    public Integer getCollect_times() {
        return collect_times;
    }

    public void setCollect_times(Integer collect_times) {
        this.collect_times = collect_times;
    }

    public Integer getArticle_id() {
        return article_id;
    }

    public void setArticle_id(Integer article_id) {
        this.article_id = article_id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getAuthor_id() {
        return author_id;
    }

    public void setAuthor_id(Integer author_id) {
        this.author_id = author_id;
    }

    public String getAuthor_name() {
        return author_name;
    }

    public void setAuthor_name(String author_name) {
        this.author_name = author_name;
    }

    public Date getUpload_date() {
        return upload_date;
    }

    public void setUpload_date(Date upload_date) {
        this.upload_date = upload_date;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public ArticleAbstractVo() {
    }

    public ArticleAbstractVo(Integer article_id, String title, Integer author_id, String author_name, Date upload_date, String digest, String cover) {
        this.article_id = article_id;
        this.title = title;
        this.author_id = author_id;
        this.author_name = author_name;
        this.upload_date = upload_date;
        this.digest = digest;
        this.cover = cover;
    }

    public ArticleAbstractVo(Article article) {
        this.article_id=article.getId();
        this.title = article.getTitle();
        this.author_name = article.getAuthorName();
        this.author_id = article.getAuthorId();
        this.upload_date = article.getPublishDate();
        this.digest = article.getDigest();
        this.cover = article.getCover();
        this.read_times = article.getReadNumber();
        this.like_times=article.getLikeNumber();
        this.comment_times=article.getCommentNumber();
        this.collect_times=article.getCollectNumber();
        this.avatar=article.getAvatar();
    }
}
